#include "Behavior.h"
#include "CpuControlledVertibrateObject.h"

Behavior::Behavior(char * animationName, void (CpuControlledVertibrateObject::*CharacterExecute)(void))
{
	this->animationName = animationName;
	this->CharacterExecute = CharacterExecute;
}

Behavior::~Behavior()
{
	if(animationName)
	{
		delete(animationName);
		animationName = NULL;
	}
}
char * Behavior::GetAnimationName()
{
	return animationName;
}
void Behavior::Execute(CpuControlledVertibrateObject * character)
{
	if(character && this->CharacterExecute)
	{
		(character->*CharacterExecute)();
	}
}
